package nc.ui.uif2.actions;

import java.awt.event.ActionEvent;
import javax.swing.Action;
import nc.ui.ml.NCLangRes;
import nc.ui.pub.beans.MessageDialog;
import nc.ui.uif2.NCAction;

public class DeleteConfirmInterceptor
  implements ActionInterceptor
{
  public boolean afterDoActionFailed(Action action, ActionEvent e, Throwable ex)
  {
    return true;
  }

  public void afterDoActionSuccessed(Action action, ActionEvent e)
  {
  }

  public boolean beforeDoAction(Action action, ActionEvent e)
  {
    return MessageDialog.showOkCancelDlg(((NCAction)action).getToftPanel(), NCLangRes.getInstance().getStrByID("uifactory", "UPPuifactory-000064"), NCLangRes.getInstance().getStrByID("uifactory", "UPPuifactory-000065"), 2) == 1;
  }
}